﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="modal-dialog x-modal-dialog" style="width: 660px; margin-top: 100px;">

  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
      <h4 class="modal-title">Session&nbsp;-&nbsp;Re Upload Assessor & Delegator</h4>
    </div>
    
    <form class="form-horizontal ms-form" method="POST" action="${ctx.host}/session-settings/${sessionId}/re-upload" enctype="multipart/form-data" data-validate="true">
    
      <input type="hidden" name="sessionId" value="${sessionId}">
      
      <div class="modal-body">
        <div class="form-group ihg-form-group">
          <label class="col-xs-3 control-label">Assessor</label>
          <div class="col-xs-6" style="padding-right: 0px;">
            <label class="form-control file-container">
               <span data-placeholder="Click here to upload assessor excel"><span class="label label-primary" style="float: right; font-size: 14px;">select file</span></span>
               <input name="assessors" type="file" accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" data-validate="required"></input>
            </label>
          </div>
          <div class="col-xs-2" style="padding-left: 5px;">
            <a href="${ctx.resource}/templates/assessor-template.xls" style="width: 100%;padding: 6px 12px;line-height: 36px;color: #D88362;text-align: center;" download="">Template</a>
          </div>
        </div>
        
        <div class="form-group ihg-form-group">
          <label class="col-xs-3 control-label">Delegate</label>
          <div class="col-xs-6"  style="padding-right: 0px;">
            <label class="form-control file-container">
               <span data-placeholder="Click here to upload assessor excel"><span class="label label-primary" style="float: right; font-size: 14px;">select file</span></span>
               <input name="delegates" type="file" accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" data-validate="required"></input>
            </label>
          </div>
          <div class="col-xs-2" style="padding-left: 5px;">
            <a href="${ctx.resource}/templates/delegate-template.xls" style="width: 100%;padding: 6px 12px;line-height: 36px;color: #D88362;text-align: center;" download="">Template</a>
          </div>
        </div>
      </div>
      
      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">Submit</button>
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">Cancel</button>
      </div>
      
    </form>
  </div>
</div>

<script type="text/javascript">
  $(document).ready(function() {
    $(document).find('form[data-validate="true"]').bt_validate() //bind validate
  })
</script>